/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.gov.ana.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author lucas.nunes
 */
@Entity
@Table(name = "QLTTB_LIM_STATUS_QUALIFICACAO")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "LimStatusQualificacao.findAll", query = "SELECT l FROM LimStatusQualificacao l"),
    @NamedQuery(name = "LimStatusQualificacao.findByLsqId", query = "SELECT l FROM LimStatusQualificacao l WHERE l.lsqId = :lsqId"),
    @NamedQuery(name = "LimStatusQualificacao.findByLsqNuPiso", query = "SELECT l FROM LimStatusQualificacao l WHERE l.lsqNuPiso = :lsqNuPiso"),
    @NamedQuery(name = "LimStatusQualificacao.findByLsqNuTeto", query = "SELECT l FROM LimStatusQualificacao l WHERE l.lsqNuTeto = :lsqNuTeto")})
public class LimStatusQualificacao implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "LSQ_ID")
    private BigDecimal lsqId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LSQ_NU_PISO")
    private BigDecimal lsqNuPiso;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LSQ_NU_TETO")
    private BigDecimal lsqNuTeto;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "stqLsqId")
    private List<StatusQualificacao> statusQualificacaoList;

    public LimStatusQualificacao() {
    }

    public LimStatusQualificacao(BigDecimal lsqId) {
        this.lsqId = lsqId;
    }

    public LimStatusQualificacao(BigDecimal lsqId, BigDecimal lsqNuPiso, BigDecimal lsqNuTeto) {
        this.lsqId = lsqId;
        this.lsqNuPiso = lsqNuPiso;
        this.lsqNuTeto = lsqNuTeto;
    }

    public BigDecimal getLsqId() {
        return lsqId;
    }

    public void setLsqId(BigDecimal lsqId) {
        this.lsqId = lsqId;
    }

    public BigDecimal getLsqNuPiso() {
        return lsqNuPiso;
    }

    public void setLsqNuPiso(BigDecimal lsqNuPiso) {
        this.lsqNuPiso = lsqNuPiso;
    }

    public BigDecimal getLsqNuTeto() {
        return lsqNuTeto;
    }

    public void setLsqNuTeto(BigDecimal lsqNuTeto) {
        this.lsqNuTeto = lsqNuTeto;
    }

    @XmlTransient
    public List<StatusQualificacao> getStatusQualificacaoList() {
        return statusQualificacaoList;
    }

    public void setStatusQualificacaoList(List<StatusQualificacao> statusQualificacaoList) {
        this.statusQualificacaoList = statusQualificacaoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (lsqId != null ? lsqId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof LimStatusQualificacao)) {
            return false;
        }
        LimStatusQualificacao other = (LimStatusQualificacao) object;
        if ((this.lsqId == null && other.lsqId != null) || (this.lsqId != null && !this.lsqId.equals(other.lsqId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.gov.ana.service.LimStatusQualificacao[ lsqId=" + lsqId + " ]";
    }
    
}
